package com.Innovationstudio.web.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.Innovationstudio.web.dao.IUserDAO;
import com.Innovationstudio.web.model.User;
import com.Innovationstudio.web.service.IUserManager;

@Component
public class UserManagerImpl implements IUserManager {
	
	@Autowired
	private IUserDAO userDaoImpl;
	
	
	public void setUserDao(IUserDAO userDao) {
		this.userDaoImpl = userDao;
	}


	@Override
	public void addUser(User user) {
		System.out.println("UserManager");
		userDaoImpl.addUser(user);
	}


	@Override
	public List<User> getAllUser() {
		return userDaoImpl.getAllUser();
	}


	@Override
	public boolean delUser(String id) {
		return userDaoImpl.delUser(id);
	}


	@Override
	public User getUser(String id) {
		return userDaoImpl.getUser(id);
	}


	@Override
	public boolean updateUser(User user) {
		return userDaoImpl.updateUser(user);
	}

}
